<!--
 * @Author: 九阳
 * @Date: 2022-07-20 09:20:13
 * @LastEditors: 九阳
 * @LastEditTime: 2022-07-20 09:48:04
-->
<template>
  <div id="mse"></div>
</template>
<script lang="ts">
import { defineComponent, onMounted } from "vue";
import Player from "xgplayer";
export default defineComponent({
  name: "video",
  setup() {
    onMounted(() => {
      const player = new Player({
        id: "mse",
        autoplay: false,
        width: 700,
        height: 400,
        url: "//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4",
        poster:
          "//lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg",
        playbackRate: [0.5, 0.75, 1, 1.5, 2], //传入倍速可选数组
      });
    });
    return {};
  },
});
</script>
<style scoped lang="scss">
#mse {
  flex: auto;
}
</style>
